/**
 * @Author: 陈瑞鹏
 * @Date:   2023-02-02 15:16:09
 * @Last Modified by:   陈瑞鹏
 * @Last Modified time: 2023-02-02 15:40:12
 */
import helpCtr from "../ctrs/helps/helpCtr";
import BaseGameComponent from "../libs/core/BaseGameComponent";

const { ccclass, property } = cc._decorator;
@ccclass
export default class helpCom extends BaseGameComponent {

  @property({ type: cc.Label, tooltip: "当前助力描述" })
  desc: cc.Label = null;

  public onEnable(): void {
    super.onEnable();
    this.drawUI();
  }

  drawUI() {
    if (helpCtr.ins.curHelpEntity) {
      this.desc.string = helpCtr.ins.curHelpEntity.desc;
    } else {
      this.desc.string = "";
    }
  }
}